﻿namespace Link_eLab.Redis.Base
{
    public interface IBaseRedis<T> where T : class, new()
    {
        /// <summary>
        /// RedisGet
        /// </summary>
        /// <param name="key"></param>
        /// <returns>JSON结果集</returns>
        T RedisGet(string key);

        /// <summary>
        /// RedisSet
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns>JSON结果集</returns>
        void RedisSet(string key, T value);

        /// <summary>
        /// RedisSet
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <param name="cacheDurationInSeconds"></param>
        /// <returns>JSON结果集</returns>
        void RedisSet(string key, T value, int cacheDurationInSeconds);

        /// <summary>
        /// RedisDel
        /// </summary>
        /// <param name="key"></param>
        /// <returns>JSON结果集</returns>
        void RedisDel(string key);

    }
}